package embedding;

/**
 * 表示嵌入向量的类
 */
public class EmbeddingVector {
    private double[] vector;
    private int dimension;

    /**
     * 创建一个新的嵌入向量
     * 
     * @param vector 向量数据
     */
    public EmbeddingVector(double[] vector) {
        this.vector = vector;
        this.dimension = vector.length;
    }

    /**
     * 创建一个新的嵌入向量
     * 
     * @param vector 向量数据
     * @param dimension 向量维度
     */
    public EmbeddingVector(double[] vector, int dimension) {
        this.vector = vector;
        this.dimension = dimension;
    }

    public double[] getVector() {
        return vector;
    }

    public void setVector(double[] vector) {
        this.vector = vector;
        this.dimension = vector.length;
    }

    public int getDimension() {
        return dimension;
    }

    public void setDimension(int dimension) {
        this.dimension = dimension;
    }
}